#include <iostream>
#include <cstring>
using namespace std;

/*
	多重继承子类隐藏父类的同名方法
	
*/
class Catamount  //猫科动物
{
public:
	void eat()
	{
		cout<<"猫科动物吃"<<endl;
	}
};

class Mammal //哺乳动物
{
public:
	void eat()
	{
		cout<<"哺乳动物吃"<<endl;
	}
};


class Leopard:public Mammal,public Catamount
{
public:
	void eat()
	{
		cout<<"豹子吃"<<endl;
	}
};

int main(int argc,char **argv)
{
	Leopard l1;
	l1.eat(); //两个父类的eat都被隐藏
	
	//调用父类的eat
	l1.Mammal::eat();
	l1.Catamount::eat();
	return 0;	
}